Displaying all children of an inlink obect

Hi,

I am not sure how to do this but I have an object X which contains an inlink from an object Y in another module.

Object  Y (will ALWAYS be a heading) and will have a number of children (Y.1, Y.2,Y.3 etc) which each of which may also contain children (Y.1.1.     Y.1.2,    Y.2.1  etc etc). The number of levels under Y is not always the same.

Can anyone advise how I can create a layout DXL that will be able to display, for Object X, the inlink Object Y (in bold format) followed by ALL the objects (children, grandchilden etc  etc ) under Y?

 

Thainks for any advice

Ray

 


monde888 - Wed Dec 04 16:22:46 EST 2013

Re: Displaying all children of an inlink obect
llandale - Thu Dec 05 14:41:04 EST 2013

First, create a layout with the wizard such that "all" inlinked objects are shown (specifically that means open the other module); and get it to display something about object Y; such as Object Heading.

edit the Layout.  Where you see "display" commands you should see that Object otherO represents your "Y".  Now you can recursively iterate all children of Y; outlined as follows:

  • void Recurse(Object o, int Level)
  • {  if (null o) then return
  •     if (isDeleted(o)) then return 
  •    display number of TAB characters for each input Level
  •     display something about o
  •     Object oChild
  •     for oChild in o do
  •    {  Recurse(oChild, Level+1)
  •    }
  • }
  • Recurse(otherO, 0)

-Louie